package com.etc.dao.impl;

import org.junit.BeforeClass;
import org.junit.Test;

import com.etc.dao.PersonDao;
import com.etc.entity.Person;
	
public class PersonDaoImplTest {

	static PersonDao personDao = null;
	@BeforeClass
	public static void setUpBeforeClass() throws Exception {
		personDao = new PersonDaoImpl();
	}

	@Test
	public void testSelectOrderByPerson() {
		int orderId = 2;
		Person person = personDao.selectPersonByOrder(orderId);
		System.out.println(person);
		/*SqlSession session = MyBatisUtil.getSqlSession();
		Person person = session.selectOne("selectOrderByPerson", 1);
	//	System.out.println(person.getOrderList());
		List<Orders> list = new ArrayList<Orders>();
		for(Orders orders : person.getOrderList()){
			list.add(orders);
			System.out.println(orders);
		}
		System.out.println(list.size());*/
		
	}

}
